package com.yoyo.ad.contract;

import com.yoyo.ad.main.IAdIpCount;
import com.yoyo.ad.main.IUpdateView;
import com.yoyo.ad.utils.BaseView;
import com.yoyo.ad.yoyo.IYoyoAdListener;

import io.reactivex.disposables.Disposable;

public interface AdContract {

    interface View extends BaseView {
        void onAdSuccess();

        void onAdFail(String err);
    }

    interface Presenter {
        /**
         * 获取广告配置
         */
        void qryAdConfigList();

        /**
         * 获取C段ip展示次数
         *
         * @param position 广告id
         */
        void qryCIpShowCount(String position, IAdIpCount iAdIpCount);

        /**
         * ip上报
         */
        void addCIpShowCount(long adId);

        /**
         * 受限上报
         */
        void addBounded(boolean isIntercept, String boundedTime, String adPositionBoundedJson, String adBoundedJson, IUpdateView iUpdateView);

        /**
         * 统计上报
         */
        void addStatistics( String jsonString, IUpdateView iUpdateView);

        /**
         * 请求自定义广告
         */
        Disposable qryYoyoAdConfig(String jsonString, IYoyoAdListener iYoyoAdListener);
    }
}
